13599d
@@ -73,10 +73,10 @@
public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrateg
         if (room != null) {
             return createGroupChatProducer();
         } else {
-            if (participant == null) {
+            if (getParticipant() == null) {
                 throw new IllegalArgumentException("No room or participant configured on this endpoint: " + this);
             }
-            return createPrivateChatProducer(participant);
+            return createPrivateChatProducer(getParticipant());
         }
     }
 
@@ -103,7 +103,7 @@
public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrateg
 
     @Override
     protected String createEndpointUri() {
-        return "xmpp://" + host + ":" + port + "/" + participant + "?serviceName=" + serviceName;
+        return "xmpp://" + host + ":" + port + "/" + getParticipant() + "?serviceName=" + serviceName;
     }
 
     public boolean isSingleton() {
@@ -266,7 +266,8 @@
public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrateg
     }
 
     public String getParticipant() {
-        return participant;
+        // participant is optional so use user if not provided
+        return participant != null ? participant : user;
     }
 
     public void setParticipant(String participant) {
